package com.jt.controller;

import com.jt.pojo.Result;
import com.jt.pojo.Role;
import com.jt.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @RequestMapping("/allRoleList")
    public Result getRoleList() {
        List<Role> roleList = roleService.getRoleList();
        return  new Result().setCode(200).setData(roleList).setMasege("查询角色列表");
    }
}
